<template>
    <div class="app-container">
        <el-tabs v-model="activeName" @tab-click="handleClick">
            <el-tab-pane label="全部" name="all">
                <div class="btnList">
                    <el-button @click="removeAll()" class="addStyle">批量删除</el-button>
                    <el-button>导入</el-button>
                    <el-button>导出</el-button>
                </div>
                <ul class="mainList">
                    <li class="listOne">
                        <i class="el-icon-plus" @click="gotonewConstruction"></i>
                    </li>
                    <li class="listOther">
                        <div class="divTop">
                            <i class="el-icon-caret-bottom"></i>
                            <div class="imgStyle"></div>
                            <el-checkbox v-model="checked"></el-checkbox>
                        </div>
                        <p>mongoDB</p>

                    </li> 
                </ul>
            </el-tab-pane>
            <el-tab-pane label="结构化" name="structuring">
                <div class="btnList">
                    <el-button @click="removeAll()" class="addStyle">批量删除</el-button>
                    <el-button>导入</el-button>
                    <el-button>导出</el-button>
                </div>
                <ul class="mainList">
                    <li class="listOne">
                        <i class="el-icon-plus" @click="gotonewConstruction"></i>
                    </li>
                    <li class="listOther">
                        <div class="divTop">
                            <i class="el-icon-caret-bottom"></i>
                            <div class="imgStyle"></div>
                            <el-checkbox v-model="checked"></el-checkbox>
                        </div>
                        <p>mongoDB</p>

                    </li>
                </ul>
            </el-tab-pane>
            <el-tab-pane label="非结构化" name="unstructured">
                <div class="btnList">
                    <el-button @click="removeAll()" class="addStyle">批量删除</el-button>
                    <el-button>导入</el-button>
                    <el-button>导出</el-button>
                </div>
                <ul class="mainList">
                    <li class="listOne">
                        <i class="el-icon-plus" @click="gotonewConstruction"></i>
                    </li>
                    <li class="listOther">
                        <div class="divTop">
                            <i class="el-icon-caret-bottom"></i>
                            <div class="imgStyle"></div>
                            <el-checkbox v-model="checked"></el-checkbox>
                        </div>
                        <p>mongoDB</p>

                    </li> 
                </ul>
            </el-tab-pane>
            <el-tab-pane label="半结构化" name="semiStructured">
                <div class="btnList">
                    <el-button @click="removeAll()" class="addStyle">批量删除</el-button>
                    <el-button>导入</el-button>
                    <el-button>导出</el-button>
                </div>
                <ul class="mainList">
                    <li class="listOne">
                        <i class="el-icon-plus" @click="gotonewConstruction"></i>
                    </li>
                    <li class="listOther">
                        <div class="divTop">
                            <i class="el-icon-caret-bottom"></i>
                            <div class="imgStyle"></div>
                            <el-checkbox v-model="checked"></el-checkbox>
                        </div>
                        <p>mongoDB</p>

                    </li>
                </ul>
            </el-tab-pane>
        </el-tabs>
        <newConstruction v-if="newConstructionBloon" :newConstructionBloon="newConstructionBloon" @closeAddtoGroup="closeAddtoGroup" :dataObj="dataObj"></newConstruction>
    </div>
</template>
  
<script>
import moment from "moment";
import newConstruction from "./componnets/newConstruction.vue"
export default {
    name: "typeMaintenance",
    components: {
        newConstruction,
    },
    data() {
        return {
            activeName: 'all',
            checked:true,
            newConstructionBloon:false,
            dataObj:{},
        }
    },
    mounted() {

    },
    methods: {
        handleClick(tab, event) {
            console.log(tab, event);
        },
        //批量删除
        removeAll() {

        },
          //关闭弹框
          closeAddtoGroup(){
            this.newConstructionBloon=false;
        },
        //打开新建
        gotonewConstruction(){
            this.newConstructionBloon=true;
        },
    }
};
</script>
<style lang="scss" scoped>
@import "~@/assets/styles/mixin.scss";
@import "~@/assets/styles/variables.scss";
@import "~@/assets/styles/CommonStyle.scss";
.mainList{
    width: 100%;
    height: 700px;
    overflow-y: auto;
    li{
        float: left;
        margin-right: 30px;
        margin-bottom: 30px;
    }
}
.listOne{
  width: 150px;  
  height: 180px;
  line-height: 180px;
  background-color: #ccc;
  text-align: center;
  .el-icon-plus{
    height: 30px;
    font-size: 30px;
    
  }
}
.listOther{
  width: 150px;  
  height: 180px;
  background-color: aliceblue;
  p{
    width: 100%;
    height: 40px;
    line-height: 40px;
    text-align:center;
  }
}
.divTop{
    width: 100%;
    height: 140px;
    position: relative;
}
.el-icon-caret-bottom{
    position: absolute;
    top: 15px;
    left: 15px;
}
.el-checkbox{
    position: absolute;
    top: 15px;
    right: 15px;
}
.imgStyle{
    width: 80px;
    height: 60px;
    background-color: #ccc;
    position: absolute;
    top: 40px;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
}
</style>
  